1. Field of the Invention
The present invention relates to an outlining method for generating outline data from image data, an image compression method using the same, an outlining apparatus, and an outlining program.
2. Description of the Related Art
A variety of techniques for outlining a character portion included in the image data have been conventionally proposed.
For example, Document 1 (Japanese Laid-Open Patent Publication No. 2005-346137) discloses a technique for generating outlined data by scanning the image printed on a sheet of paper.
In Document 1, when noise such as loss of pixels occurs on the contour of a character during scanning, the noise is removed after outlining process.
In the case of the conventional process of generating outlined data, contour pixels are extracted for each character from the binarized data, the outer contour is subjected to straight-line approximation based on the extracted contour pixels, and the data subjected to straight-line approximation is subjected to curved-line approximation.
For example, in the case where four points including pixels P1-P4 shown in FIG. 17 each are extracted as a contour pixel, a line indicated by a straight line L0 in FIG. 18 is obtained. Then, if certain conditions are satisfied, in place of the lines connecting pixels P1-P4 shown by dashed lines in FIG. 18, straight line L0 is used as an outer contour to generate data for straight-line approximation. Note that straight line L0 is, for example, equally distanced from each of pixels P1-P4. As an example of the certain conditions, the sum of the distances from straight line L0 to pixels P1-P4 reaches a value of not more than a predetermined threshold value.
However, if the outer contour of the character is subjected to straight-line approximation in the manner described with reference to FIGS. 17 and 18, there may be a case where, in the outlined data, the portion that should be represented by a horizontal or vertical line is represented, due to loss of the pixels at the end portion, more or less obliquely with respect to the direction in which the line should extend. Referring to FIGS. 19A and 19B, this will be specifically described.
FIG. 19A is an example of a binarized image of an alphabetic character “E”, and FIG. 19B is an example of the data obtained by outlining the binarized image in FIG. 19A.
As understood from the comparison with the corresponding portion in FIG. 19A, a line LX1 forming the outer contour on the underside within the dashed-line circle in the upper left area in FIG. 19B should have been represented by a horizontal line without making any modification to the data of the binarized image, but is subjected to straight-line approximation as explained with reference to FIGS. 17 and 18. This causes line LX1 to extend in the direction intersecting with the horizontal direction (obliquely in the lower right direction).
Furthermore, also as compared with the corresponding portion in FIG. 19A, a line LX2 forming the outer contour on the upper side within the dashed-lined circle in the lower area in FIG. 19B should have been represented by a horizontal line without making any modification to the data of the binarized image, but extends in the direction intersecting with the horizontal direction (obliquely in the upper right direction).
In other words, in the conventional outlining process, in spite of the fact that the outer contour which should have been represented by a horizontal or vertical line is represented by a horizontal or vertical line in the binarized image, the image processing may cause the outer contour to be represented by a line at an angle with respect to the horizontal or vertical direction. If the outer contour of the outlined image that should have been represented by a line extending in the horizontal or vertical direction is represented by a line at an angle with respect to the horizontal or vertical direction, the outer contour becomes conspicuous and the viewer may feel it strange.